package com.yhd.commonauth.auth;

import com.yhd.commonauth.annotation.Authorization;
import com.yhd.commonauth.util.SpringBeanUtil;

public class AuthenticationProxy {

    public static Authentication getInstance(Authorization annotation) {
        if (annotation == null) {
            return null;
        }
        return (Authentication) SpringBeanUtil.getBean(annotation.value());
    }
}
